how to determine end behavior